<?php


namespace App\Admin\Actions\Post;


use App\Models\HouseType as Houses;
use Dcat\Admin\Grid;
use Dcat\Admin\Grid\LazyRenderable;

class HouseType extends LazyRenderable
{
    public function grid():Grid
    {
        return Grid::make(new Houses(), function (Grid $grid) {
            $grid->column('id')->sortable();
            $grid->column('house_type_name','房类型名称');
            $grid->column('created_at');
            $grid->column('updated_at')->sortable();
            $grid->filter(function (Grid\Filter $filter) {
                $filter->equal('id');
            });
        });
    }
}
